docs: add Python testing best practices guide#6
docs: add Python testing best practices guide#6agent-kurouto[bot] wants to merge 2 commits intodevfrom
Conversation
Add docs/testing.md covering unit tests, integration tests, E2E tests, property-based testing with Hypothesis, mocking with pytest-mock, test organisation (conftest.py, markers, pyproject.toml config), coverage targets with pytest-cov, and a complete worked example. Update README.md contents table with a link to the new guide. Closes PLT-1027 Co-Authored-By: agent-kurouto[bot] <268466204+agent-kurouto[bot]@users.noreply.github.com>
| --- | ||
|
|
||
| ## Table of Contents | ||
|
|
There was a problem hiding this comment.
Can we add a section that discusses what tests users should do if they are just getting started. Listing all different kinds of available tests can be overwhelming
Add a new Section 1 that gives newcomers a clear, incremental path into testing: install pytest → unit test core logic → add a smoke integration test → reach for the advanced tools only as needed. Renumber all subsequent sections accordingly and update the ToC. Addresses review feedback on PLT-1027.
Response to review comments@eywalker — Can we add a section that discusses what tests users should do if they are just getting started. Listing all different kinds of available tests can be overwhelming Done! Added a new Section 1 — "Where to Start" (commit
The existing sections are unchanged and now serve as the reference material that "Where to Start" links readers to when they're ready. PR summaryThis PR adds What's covered
|
Summary
docs/testing.md— a comprehensive Python testing best practices guide covering unit tests, integration tests, E2E tests, property-based testing (Hypothesis), mocking & patching (pytest-mock), test organisation, and coverageREADME.mdto include the new guide in the contents tableGuide sections
@pytest.mark.parametrizehttpxasync client, CLI subprocess testing@given, strategies, shrinkingunittest.mock,pytest-mock, when not to mockconftest.py, naming conventions,pyproject.tomlconfigpytest-cov, threshold enforcement, HTML reports,# pragma: no coverTest plan
docs/testing.mdfor accuracy and consistency with existing guidesREADME.mdcontents table renders correctlyCloses PLT-1027
🤖 Generated with Claude Code